<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>提现申请</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
<script language="javascript" src="../script/Calendar.js"></script>
</head>
<body>
<div class="container">
    <div class="flow">
        <div class="itemtitle">
            <h3>提现申请</h3>
            <ul>
                <li <{if $smarty.get.status==''}>class="current"<{/if}>><a href="?m=<{$smarty.get.m}>&s=<{$smarty.get.s}>"><span>管理</span></a></li>
                <{foreach item=list key=num from=$withdraw_apply_status}>
                <li <{if $smarty.get.status!='' && $num==$smarty.get.status}>class="current"<{/if}>><a href="?m=<{$smarty.get.m}>&s=<{$smarty.get.s}>&status=<{$num}>"><span><{$list}></span></a></li>
                <{/foreach}>
            </ul>
        </div>
    </div>
    <div class="h35"></div>
    <form action="" method="get">
        <input type="hidden" name="m" value="product">
        <input type="hidden" name="s" value="withdraw_apply.php">
        <table class="select_table">
            <tbody>
                <tr>
                    <td width="60">会员ID:</td>
                    <td width="100"><input id="rec_member_id" type="text" name="rec_member_id" class="w100" value="<{$smarty.get.rec_member_id}>" /></td>
                    <td width="50">状态:</td>
                    <td width="30">
                        <select name="status">
                            <option value="">全部</option>
                            <option value="0" <{if '0'==$smarty.get.status}>selected<{/if}>>未审核</option>
                            <option value="1" <{if '1'==$smarty.get.status}>selected<{/if}>>审核通过</option>
                            <option value="-2" <{if '-2'==$smarty.get.status}>selected<{/if}>>审核未通过</option>
                            <option value="-1" <{if '-1'==$smarty.get.status}>selected<{/if}>>已取消</option>
                            <option value="9" <{if '9'==$smarty.get.status}>selected<{/if}>>已打款</option>
                        </select>
                    </td>
                    <input type="hidden" id="order" name="" value="" />
                    <td><input id="search" type="image" src="<{$config.weburl}>/image/admin/search.gif" /></td>
                </tr>
                
            </tbody>
        </table>
    </form>
        
    <table class="table product">
       <tbody>
       <tr class="header">
            <th width="60">操作</th>
            <th width="80">用户ID</th>
            <th width="150">用户名称</th>
            <th width="100">用户类型</th>
            <th width="100">账户类型</th>
            <th width="150">提现账户</th>
            <th width="100">收款人</th>
            <th width="150">提现金额</th>
            <th width="150">账户银行地址</th>
            <th width="150">联系电话</th>
            <th width="100">申请时间</th>
            <th width="100">审核时间</th>
            <th width="100">审核人</th>
            <th width="100">打款时间</th>
            <th width="100">打款人</th>
            <th width="100">打款账户类型</th>
            <th width="100">打款账号</th>
            <th width="100">打款交易流水号</th>
            <th width="130">状态</th>
            <th width="130">备注</th>
        </tr>
        <{foreach item=list from=$de.list}>
        <tr class="<{if $list.status==1}>bold<{/if}>">
            <td>
            <{if $list.status!=-1 and $list.status!=9}>
            <div class="operate">
                <a class="opear" href="#">操作<i></i></a>
                <ul>
					<{if $list.status==0}>
					<li><a class="a-opear" data-type="pass" data-param="{'id':'<{$list.id}>'}" href="#">审核通过</a></li>
					<li><a class="a-opear" data-type="not_pass" data-param="{'id':'<{$list.id}>'}" href="#">不通过</a></li>
					<{/if}>
					<{if $list.status==1}>
					<li><a class="a-opear" data-type="complete" data-param="{'id':'<{$list.id}>'}" href="#">打款</a></li>
					<{/if}>
					<li><a class="a-opear" data-type="cancel" data-param="{'id':'<{$list.id}>'}" href="#">取消</a></li>
                </ul>
            </div>
            <{elseif $list.status==9}>
            已打款
            <{else}>
            已取消
            <{/if}>
            </td>
            <td><{$list.member_id}></td>
            <td><{$list.name}></td>
            <td><{$list.member_type}></td>
            <td><{$list.account_type_str}></td>
            <td><{$list.account_number}></td>
            <td><{$list.account_name}></td>
            <td><{$list.apply_money}></td>
            <td><{$list.account_bank_addr}></td>
            <td><{$list.mobile}></td>
            <td><{$list.apply_time}></td>
            <td><{if $list.examine_time }><{$list.examine_time|date_format:"%Y-%m-%d %H:%M:%S"}><{/if}></td>
            <td><{$list.examine_user}></td>
            <td><{if $list.finish_time }><{$list.finish_time|date_format:"%Y-%m-%d %H:%M:%S"}><{/if}></td>
            <td><{$list.finish_user}></td>
            <td><{$list.money_account_type_str}></td>
            <td><{$list.money_account_number}></td>
            <td><{$list.transaction_serial_number}></td>
            <td><{$list.status_name}></td>
            <td><{$list.discription}></td>
        </tr>
        <{foreachelse}>
        <tr>
            <td class="norecord" colspan="99"><i></i><span>暂无符合条件的数据记录</span></td>
        </tr>
        <{/foreach}>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="99">
                    <div class="fl">每页最多显示： 20条</div>
                    <div class="page"><{$de.page}></div>
                    <div class="fr">共有<{$de.count}>条记录</div>
                </td>
            </tr>
        </tfoot>
    </table>
<script>
$(".a-opear").live('click',function(){
    
    var data = $(this).attr('data-param');
    eval("data = "+data);
    var type = $(this).attr('data-type');
    if(!data.id)
    {
        error('error','对不起，请选择申请后操作！');
        return false;
    }
    
    window.parent.ajax_form("withdraw_apply", "操作提现申请", '<{$config.weburl}>/admin/module.php?m=product&s=withdraw_apply.php&type='+type+'&id='+data.id, 800);
    return false;
    
});
$('.operate').hover(function(){                  
    if ($(this).position().top + $(this).children("ul").height() + $(this).parent("td").height() - $(window).height()- $(window).scrollTop()  < 0) {
        $(this).addClass("hover");
        $(this).children("ul").css("top", "22px");
    } else {
        $(this).addClass("hover-up");
        $(this).children("ul").css("top", -$(this).children("ul").height());
    }
},function(){
    $(this).removeClass("hover").removeClass("hover-up");   
});
$('.search').bind("mouseenter", function (e) {
    $(this).addClass("hover");
}).bind("mouseleave", function (e) {
    //$(this).removeClass("hover");
});
$('.close').bind("click", function (e) {
    $(this).parent().parent().removeClass("hover");
}) 
</script>    
</div>
</body>
</html>